

package gov.nbcs.govp.zbgl.ui.thread;

import com.foundercy.pf.control.FPageRoller;
import com.foundercy.pf.control.table.FTable;

import com.foundercy.pf.util.FPaginationDTO;

import gov.nbcs.govp.common.bean.PageListBean;

import gov.nbcs.govp.common.ui.DisplayPanel;
import gov.nbcs.govp.common.util.PlatformTools;
import gov.nbcs.govp.common.util.WhereObject;
import gov.nbcs.govp.jhgl.ibs.IGovpPlanBusiness;

import java.awt.Component;
import java.awt.Cursor;
import java.util.List;


public class GovpZBPlanLoadPage extends Thread {
	
	private DisplayPanel panel;
	private WhereObject where;
	private FPaginationDTO page;
	private FPageRoller pageRoller;
	String find_sql="";
	int num = 0;
	private IGovpPlanBusiness PlanBusiness;

	
	public GovpZBPlanLoadPage(DisplayPanel panel,IGovpPlanBusiness PlanBusiness,FPageRoller pageRoller,String find_sql,FPaginationDTO page){
		this.panel = panel;
		this.PlanBusiness = PlanBusiness;
		this.page = page;
		this.find_sql=find_sql;
		this.pageRoller = pageRoller;
		
	}
	
	public void run()
	{
		panel.setCursor(new Cursor(Cursor.WAIT_CURSOR));
		FTable table = panel.getOperationTable()[0];
		Component c = PlatformTools.replaceTableAsDoing(table);
		PageListBean pagelist = PlanBusiness.loadPlanBillByState(panel.getUser(),panel.getCurrentState(),page,find_sql,num);
		List list = pagelist.getDataList();
		PlatformTools.replaceTableAsDone(c,table);
		table.setData(list);
		panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
	}


}
